import type { patient, PageDoc } from '@/types/home';
import { http } from '@/utils/request';
// 首页-查询推荐/减脂/饮食健康/关注页面--百科文章列表

export const getHomeKnowledgeAPI = (
  type: 'recommend' | 'fatReduction' | 'food' | 'like',
  current: number,
  pageSize: number
) =>
  http<patient>('/patient/home/knowledge', 'GET', { type, current, pageSize });

//首页-关注的医生列表
export const getHomePageDocAPI = (current: number, pageSize: number) =>
  http<PageDoc>('/home/page/doc', 'GET', { current, pageSize });


// 关注
export const getLikeAPI =(type:string,id:string) =>
  http('/like','POST',{type,id})



// 首页问医生 全部科室
export const getDepAAPI =() =>
  http('/dep/all','GET',{})

export const getDepChildrenAAPI =() =>
  http('/dep/children/all','GET',{})


// 疾病查询列表
export const getPatientDiseaseAPI =(depId:string) =>
  http(`/patient/disease/list`,'GET',{depId})



export const getPatientDiseaseDetailAPI =(id:string) =>
  http(`/patient/disease/detail`,'GET',{id})
